export const heightListen = {
    data() {
        let clientHeight = document.documentElement.clientHeight
        return {
            fullHeight: clientHeight > 800 ? clientHeight: 800 ,
            timer: null
        }
    },
    computed: {
        pageHeight() {
            return this.fullHeight - 90
        }
    },
    watch: {
        fullHeight(val) {
            if (!this.timer) {
                this.fullHeight = val
                this.timer = true
                let that = this
                setTimeout(function () {
                    that.timer = false
                }, 400)
            }
        }
    },
    mounted() {
        const that = this
        window.onresize = () => {
            return (() => {
                let clientHeight = document.documentElement.clientHeight
                window.fullHeight = clientHeight > 800 ? clientHeight: 800
                that.fullHeight = window.fullHeight
            })()
        }
    }
}

export const setScroll = {
    mounted() {
    }
}
